package net.trustie.core;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by LouAnt on 2017/2/7 0007
 * Description：
 */
public class URLCheck {
    public static void main(String[] args){
        String check ="^([hH][tT]{2}[pP]://|[hH][tT]{2}[pP][sS]://)(([a-zA-Z0-9\\._-]+\\.[a-zA-Z]{2,6})|([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}))(:[0-9]{1,4})*(/[a-zA-Z0-9\\&%_\\./-~-]*)?";
        Pattern p = Pattern.compile(check,Pattern.CASE_INSENSITIVE);
        String url = "http://www.leniel.net/2013/04/manage-folders-and-files-in-your-aspnet-mvc-project-with-elfinder-net-file-manager.html";
        Matcher m = p.matcher(url);
        boolean res = m.matches();
        System.out.println(res);
    }
}
